#include "Complex.h"
#include <iostream>
using namespace std;

Complex::Complex(int a, int b)
{
        this->a = a;
        this->b = b;
}

Complex::~Complex()
{
}

void Complex::printComplex()
{
        cout<<a<<" + " <<b<<"i"<<endl;


}

Complex Complex::operator-(Complex &c){
        Complex tmp(this->a-c.a, this->b-c.b);
        return tmp;
}

//重载前置--
Complex& Complex::operator--(){
        this->a--;
        this->b--;
        return *this;
}

//后置--
Complex Complex::operator--(int)
{
        Complex tmp = *this;
        this->a--;
        this->b--;
        return tmp;
}